matplotlib space between subplots

43

add space between subplots matplotlib -

fig.subplots_adjust(hspace=.5)

matplotlib add space between subplots -

import matplotlib.pyplot as plt

fig, axes = plt.subplots(nrows=4, ncols=4)
fig.tight_layout() # Or equivalently,  "plt.tight_layout()"

plt.show()

python subplot space between plots -

import matplotlib.pyplot as plt

fig, axes = plt.subplots(nrows=4, ncols=4)
fig.tight_layout(rect=[0, 0.03, 1, 0.95]) # Or equivalently, "plt.tight_layout()"

plt.show()

how to increase distance between subplot matplot lib -

left  = 0.125  # the left side of the subplots of the figure
right = 0.9    # the right side of the subplots of the figure
bottom = 0.1   # the bottom of the subplots of the figure
top = 0.9      # the top of the subplots of the figure
wspace = 0.2   # the amount of width reserved for blank space between subplots
hspace = 0.2   # the amount of height reserved for white space between subplots

Comments

Submit
0 Comments